import 'package:library_base/entities/generated/json/base/json_convert_content.dart';
import 'package:library_base/entities/stock_out_child_data_entity.dart';
import 'package:library_base/entities/weighing_goods_child_entity.dart';
import 'package:library_base/entities/weighing_goods_entity.dart';

WeighingGoodsEntity $WeighingGoodsEntityFromJson(Map<String, dynamic> json) {
  final WeighingGoodsEntity loginBeanEntity = WeighingGoodsEntity();

  final List<WeighingGoodsChildEntity> list = jsonConvert.convertList<WeighingGoodsChildEntity>(json['list']);
  loginBeanEntity.list = list;

  final String? total = jsonConvert.convert<String>(json['total']);
  if (total != null) {
    loginBeanEntity.total = total;
  }

  final StockOutChildDataEntity? data = StockOutChildDataEntity.fromJson(json['data']);
  if (data != null) {
    loginBeanEntity.data = data;
  }

  return loginBeanEntity;
}

Map<String, dynamic> $WeighingGoodsEntityToJson(WeighingGoodsEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['list'] = entity.list;
  data['total'] = entity.total;
  data['data'] = entity.data;
  return data;
}
